package fmse.uaic.k.configuration_abstraction.abstract_classes;

import java.util.List;

import fmse.uaic.k.configuration_abstraction.abstract_visitor.KAbstractNodeVisitor;

public abstract class KAbstractNode {
	protected int ID;
	protected String label;
	protected List<KAbstractNode> children;
	protected KAbstractNode parent;

	public KAbstractNode(int iD, String label,
			List<KAbstractNode> children, KAbstractNode parent) {
		super();
		ID = iD;
		this.label = label;
		this.children = children;
		this.parent = parent;
	}

	public abstract void accept(KAbstractNodeVisitor visitor);

	public int getID() {
		return ID;
	}

	public void setID(int iD) {
		ID = iD;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public List<KAbstractNode> getChildren() {
		return children;
	}

	public void setChildren(List<KAbstractNode> children) {
		this.children = children;
	}

	public KAbstractNode getParent() {
		return parent;
	}

	public void setParent(KAbstractNode parent) {
		this.parent = parent;
	}

	@Override
	public String toString() {
		return "(" + ID + ", " + label + ")";
	}
}
